# coding=utf-8
# 全世界最帅的帅哥
from flask import g

from ysgg1_club_comment.modules.base_model import BaseModel, db
from sqlalchemy.dialects.mysql import TINYINT
from sqlalchemy import event


class SubjectInfo(BaseModel):
    __tablename__ = 'subject_info'

    subject_name = db.Column(db.String(128), comment="题目名称")
    subject_difficult = db.Column(TINYINT, comment="题目难度")
    settle_name = db.Column(db.String(16), comment="出题人姓名")
    subject_type = db.Column(TINYINT, comment="题目类型 1单选 2多选 3判断 4简答")
    subject_score = db.Column(db.Integer, comment="题目分数")
    subject_parse = db.Column(db.String(512), comment="题目解析")
    subject_answer = db.Column(db.String(512), comment="题目答案")

    def __repr__(self):
        return f"<SubjectInfo {self.id}>"




